-- GENERATED SPELL FOR [Maiev Shadowsong] --


function spell0_22989(pUnit, Event) --@Fan of Blades,n/a--
pUnit:FullCastSpellOnTarget(39954,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22989', 2000, 1)
end

function spell1_22989(pUnit, Event) --@Stealth,Self--
pUnit:FullCastSpellOnTarget(34189,pUnit)
pUnit:RegisterEvent('Sorts_22989', 569, 1)
end

function Sorts_22989(pUnit, Event)
local choix_sorts_22989 = math.random(0, 1)
if choix_sorts_22989 == 0 then
pUnit:RegisterEvent('spell0_22989', 1, 1)
end
if choix_sorts_22989 == 1 then
pUnit:RegisterEvent('spell1_22989', 1, 1)
end
end

function mob22989_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22989', math.random(1500, 3000), 1)
end

function mob22989_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22989_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22989_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22989, 1, 'mob22989_Action')
RegisterUnitEvent(22989, 2, 'mob22989_Leave')
RegisterUnitEvent(22989, 3, 'mob22989_Kill')
RegisterUnitEvent(22989, 4, 'mob22989_Die')
